/*
 * @Date: 2025-01-02 14:24:55
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-01-02 14:47:21
 * @Description: 计数滚动组件
 */
import { CountTo } from 'vue3-count-to'
import { defineComponent, h } from "vue";

export default defineComponent({
  name: 'CountRoll',
  props: {
    value: { type: Number, default: 0 }
  },
  setup(props) {
    return () => {
      const result = {
        endVal: props.value || 0,
        startVal: 0,
        duration: 1500
      }
      return h(CountTo, { ...result })
    }
  }
});
